package org.example.lambda;

import java.util.function.IntFunction;

/**
 * @author why
 * @date 2022/11/1317:09
 */
public class IntFunctionLambda {

//    static int a = 10;

    public static void main(String[] args) {

        int a = 10;

        IntFunction intFunction = (int b) -> {
            return b + ";";
        };

        Object apply = intFunction.apply(a);
        System.out.println(apply);
        System.out.println(a);


        boolean re = calculate(a,b-> (b + 10 + 100+111)*3/4);

        System.out.println(re);

    }

    private static boolean calculate(int a,IntFunction intFunction) {
        return  (int)intFunction.apply(a) > 1000;
    }
}
